package designpattern.observer.mq;

public class Client {
    public static void main(String[] args) {
        OrderSubject<Object> orderPublisher = new OrderSubject<>();

        StockObserver<Object> stockSubscriber = new StockObserver<>();
        OrderObserver<Object> orderSubscriber = new OrderObserver<>();
        MessageObserver<Object> messageObserver = new MessageObserver<>();

        Result order = orderPublisher.subscribe(orderSubscriber);
        Result stock = orderPublisher.subscribe(stockSubscriber);
        Result message = orderPublisher.subscribe(messageObserver);
        orderPublisher.notify(new OrderInfo("12345678","223344","order"));
    }
}
